//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.neurosky.thinkgear;

import com.neurosky.thinkgear.TF_TD_Libraries;
import com.neurosky.thinkgear.TF_TD_Libraries.FeatureExtrationReturn;
import com.neurosky.thinkgear.TF_TD_Libraries.TF_TD_FEATUREEXTRACTION;
import com.neurosky.thinkgear.TF_TD_Libraries.TF_TD_PREPROCESSING;

public class TaskDifficulty {
    public TaskDifficulty() {
    }

    public double TaskDifficulty(double[] var1) {
        double[] var2 = new double[]{11.845260043490633D, -0.381357581804967D, 0.849489874366888D, 0.204202722295334D};
        int[] var3 = new int[]{29, 15, 20};
        double[] var4 = new double[28160];

        for(int var5 = 0; var5 < 28160; ++var5) {
            var4[var5] = var1[var5];
        }

        TF_TD_Libraries var32 = new TF_TD_Libraries();
        var32.getClass();
        var1 = (new TF_TD_PREPROCESSING(var32)).TF_TD_preprocessing(var4, 512);
        var32.getClass();
        FeatureExtrationReturn var28;
        double var10 = (var28 = (new TF_TD_FEATUREEXTRACTION(var32)).TF_TD_featureextraction(var1, 512, 2, 1)).get_hjorth_activity();
        double var12 = var28.get_hjorth_mobility();
        double var14 = var28.get_hjorth_complexity();
        var4 = var28.get_bp_row_mean();
        var28.get_bp_row_mean();
        double[] var31 = var28.get_bp_activity();
        double[] var6 = var28.get_bp_mobility();
        var1 = var28.get_bp_complexity();
        double[] var7 = new double[var4.length + 1 + 1 + 1 + var31.length + var6.length + var1.length];
        int var8 = 0;

        int var9;
        for(var9 = 0; var9 < var4.length; ++var9) {
            var7[var8] = var4[var9];
            ++var8;
        }

        var7[var8] = var10;
        ++var8;
        var7[var8] = var12;
        ++var8;
        var7[var8] = var14;
        ++var8;

        for(var9 = 0; var9 < var31.length; ++var9) {
            var7[var8] = var31[var9];
            ++var8;
        }

        for(var9 = 0; var9 < var6.length; ++var9) {
            var7[var8] = var6[var9];
            ++var8;
        }

        for(var9 = 0; var9 < var1.length; ++var9) {
            var7[var8] = var1[var9];
            ++var8;
        }

        for(var9 = 0; var9 < var7.length; ++var9) {
            var7[var9] = Math.log10(var7[var9]);
        }

        var9 = var3[0] - 1;
        int var29 = var3[1] - 1;
        int var30 = var3[2] - 1;
        return var2[0] + var2[1] * var7[var9] + var2[2] * var7[var29] + var2[3] * var7[var30];
    }
}
